package com.kxj.xfyy;

import android.os.Bundle;
import android.util.Log;

import com.iflytek.cloud.SpeechError;
import com.iflytek.cloud.SynthesizerListener;


public class TtsSynthesizerListener implements SynthesizerListener {
	private static String TAG="TtsPlugin";
	@Override
	public void onSpeakBegin() {
		Log.i(TAG, "onSpeakBegin-->开始播放");
	}

	@Override
	public void onSpeakPaused() {
		Log.i(TAG, "onSpeakPaused-->播放暂停");
	}

	@Override
	public void onSpeakResumed() {
		Log.i(TAG, "onSpeakResumed-->继续播放");
	}

	@Override
	public void onBufferProgress(int percent, int beginPos, int endPos,
			String info) {
		// 合成进度
		Log.i(TAG, "onBufferProgress-->合成进度"+percent);
	}

	@Override
	public void onSpeakProgress(int percent, int beginPos, int endPos) {
		// 播放进度
		Log.i(TAG, "onSpeakProgress-->播放进度"+percent);
	}

	@Override
	public void onCompleted(SpeechError error) {
		//会话结束回调接口，没有错误时，error为null
		Log.i(TAG, "onCompleted-->");
	}

	@Override
	public void onEvent(int eventType, int arg1, int arg2, Bundle obj) {
		Log.i(TAG, "onEvent-->");
	}

}
